<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <title>WebConsole</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta name="Keywords" content="ApiBox.Club">
    <meta name="Description" content="ApiBox.Club">
    <meta name="copyright" content="2015 ApiBox.Club">
    <meta name="author" content="Eric Shi/QQ:155122504">
    <link rel="shortcut icon" href="/static/images/logo_128X128.ico" type="image/x-icon">
    <!--[if lt IE 9]>
    <script src="/static/scripts/libs/html5/json/json2.min.js" type="text/javascript"></script>
    <script src="/static/scripts/libs/html5/html5shiv/html5shiv.min.js" type="text/javascript"></script>
    <script src="/static/scripts/libs/html5/respond/respond.min.js" type="text/javascript"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="/static/scripts/libs/metro-ui/css/metro.min.css">
    <link type="text/css" rel="stylesheet" href="/static/scripts/libs/metro-ui/css/metro-icons.min.css">
    <link type="text/css" rel="stylesheet" href="/static/scripts/libs/metro-ui/css/metro-responsive.min.css">
    <style type="text/css">
    .terminal {
        width: 100%;
    }
    </style>
</head>

<body class="bg-steel">
    <div id="c-appbar" class="app-bar darcula" data-role="appbar">
        <a href="javascript:void(0);" class="app-bar-element branding">WebConsole</a>
        <span class="app-bar-divider"></span>
        <ul class="app-bar-menu">
            <li><a href="javascript:location.replace(location.href);">刷新</a></li>
        </ul>
        <div class="app-bar-element place-right">
            <span class="dropdown-toggle">
                <i class="mif-cog"></i>
            <abc% .UserName %>
                </span>
            <div class="app-bar-drop-container padding10 place-right no-margin-top block-shadow fg-dark" data-role="dropdown" data-no-close="true" style="width: 220px">
                <h5 class="text-light">我的控制台</h5>
                <ul class="unstyled-list fg-dark">
                    <li><a href="javascript:void(0);" target="_blank">在线帮助</a></li>
                    <li><a href="http://www.eriloan.com" target="_blank">论坛交流</a></li>
                    <li class="divider"></li>
                    <li><a href="javascript:void(0);">关于 WebConsole</a></li>
                    <li class="divider"></li>
                    <li><a href="javascript:void(0);" onclick="$.LogOut();" class="fg-white3 fg-hover-yellow">退出</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="page-content">
        <div id="console_div">
        </div>
    </div>
</body>
<script src="/static/scripts/libs/bowser/bowser.min.js" type="text/javascript"></script>
<script type="text/javascript">
var bowserVerErrMsg = "WebClonsole 工具使用了 HTML5 的核心相关技术，为了更好的体验该工具，请升级您的浏览器到IE9、Chrome 40、Firefox 38、Safari 9或更高版本。";

var bowserVer = Number(bowser.version);

var bowserVerFunc = function() {
    var bowserBody = document.getElementsByTagName("body")[0];
    bowserBody.innerHTML = "";

    var errDiv = document.createElement("div");
    errDiv.innerHTML = bowserVerErrMsg;
    errDiv.style.display = "inline-block";
    errDiv.style.position = "absolute";
    errDiv.style.zIndex = "1500";
    errDiv.style.top = "40%";
    errDiv.style.width = "100%";
    errDiv.style.textAlign = "center";
    errDiv.style.color = "#FFFFFF";

    bowserBody.appendChild(errDiv);
};


if (bowser.msie && bowserVer < 9) {
    bowserVerFunc();
    alert(bowserVerErrMsg);
}

if (bowser.firefox && bowserVer < 38) {
    bowserVerFunc();
    alert(bowserVerErrMsg);
}

if (bowser.chrome && bowserVer < 40) {
    bowserVerFunc();
    alert(bowserVerErrMsg);
}

if (bowser.safari && bowserVer < 9) {
    bowserVerFunc();
    alert(bowserVerErrMsg);
}
</script>
<script src="/static/scripts/libs/jquery/jquery-2.2.0.min.js" type="text/javascript"></script>
<script src="/static/scripts/libs/metro-ui/js/metro.min.js" type="text/javascript"></script>
<script src="/static/scripts/libs/termjs/term.min.js" type="text/javascript"></script>
<script src="/static/scripts/console.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
    $("#console_div").OpenTerminal({
        "wsaddr": "<abc% .WS_Addr %>"
    });
});
</script>

</html>
